<form class="container-sm" (ngSubmit)="onSubmit()" [formGroup]="formGroup">
  <div class="mb-3 row">
    <label class="col-sm-2 col-form-label">名称</label>
    <div class="col-sm-10">
      {{nameFormControl.invalid}}
      <input type="text" class="form-control" [formControl]="nameFormControl">
      <small class="text-danger" *ngIf="nameFormControl.invalid">
        班级名称不能为空
      </small>
    </div>
  </div>
  <div class="mb-3 row">
    <label class="col-sm-2 col-form-label">班主任</label>
    <div class="col-sm-10">
      <app-klass-select formControlName="teacherId"></app-klass-select>
    </div>
  </div>
  <div class="mb-3 row">
    <div class="col-sm-10 offset-2">
      <button class="btn btn-primary" [disabled]="formGroup.invalid">保存
      </button>
    </div>
  </div>
</form>

